/*
package com.yunc.shop.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;

@Configuration
@EnableResourceServer
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {

    */
/**
     * 声明资源服务器的主键
     * 声明token为Jwt
     *//*

    */
/*@Override
    public void configure(ResourceServerSecurityConfigurer resources) {
        resources.resourceId("yunxing-shop").tokenStore(tokenStore());
    }

    @Bean
    public TokenStore tokenStore() {
        return new JwtTokenStore(jwtTokenEnhancer());
    }

    @Bean
    public JwtAccessTokenConverter jwtTokenEnhancer() {
        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
        String publicKey = "-----BEGIN PUBLIC KEY-----\n" +
                "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwA7sWLTVlwjIJ7Qih1hl\n" +
                "gL9srgi3WKL0O0tXhLomBjlwsEeXkPTfaLThXKLR2txJCbjJlnqVMMn8fArB1pAW\n" +
                "2ifstlMq2qsXs3Xkzx93ynpVZ/QB3oREfexVLFaiWGyi+85Fgr+zHd5BL+Vmar7e\n" +
                "ilF/HkXlWUUnuu0Y+MQ3IvCq+pqbWuHietdbmQjaOpLTrrYT8UMnCzMeTXIPAZFW\n" +
                "/u4Dez5VfOw+4jTbm56/J2QUM9sCBaFfJjel2aYyaUvDUJByvbFbjZbqeHc2mRxc\n" +
                "z1e7WKqcLuZrpMopZ7z261mjdccLKB2k/KD5fBVhvo6rrrpJuZmTMeeeSX7meUhn\n" +
                "2QIDAQAB\n" +
                "-----END PUBLIC KEY-----";
        converter.setVerifierKey(publicKey);
        return converter;
    }*//*


    */
/**
     * 除/shop外的接口可以匿名访问
     *//*

    @Override
    public void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/shop/**").authenticated()
                .anyRequest().permitAll();
    }
}

*/
